package com.qiuling.iot.service;


import com.qiuling.iot.entity.EquipmentInfo;
import com.qiuling.iot.vo.req.EquipmentInfoAddReqVO;
import com.qiuling.iot.vo.req.EquipmentInfoChangeReqVO;
import com.qiuling.iot.vo.req.EquipmentInfoUpdateReqVO;
import com.qiuling.iot.vo.resp.EquipmentInfoRespNodeVO;

import java.util.List;

/**
 * @Author：zhangqiang
 * @Description：
 * @Date：Created in 0:24 2020/2/13
 * @Modified By：
 */
public interface EquipmentInfoService {

    List<EquipmentInfo> selectAll(String userId);

    /**
     * @param equipmentId
     * @return java.util.List<com.qiuling.iot.vo.resp.EquipmentInfoRespNodeVO>
     * @description 获取当前设备id下的叶子节点，去当前节点
     * </br>
     * @author zhangqiang
     * @date 23:24 2020/2/13
     */
    List<EquipmentInfoRespNodeVO> EquipmentTreeList(String equipmentId, String userId);

    EquipmentInfo addEquipmentInfo(EquipmentInfoAddReqVO vo, String userId);

    void updateEquipmentInfo(EquipmentInfoUpdateReqVO vo);

    void deleteEquipmentInfo(String id);

    void changeStatus(EquipmentInfoChangeReqVO vo, String userId);

    /**
     * @description 根据用户id和设备id获取该用户名下的单一设备
     * </br>       
     * @param id
     * @param userId
     * @return com.qiuling.iot.entity.EquipmentInfo
     * @author zhangqiang
     * @date 16:11 2020/2/23
     */
    EquipmentInfo getEquipmentInfoByIdAndUserId(String id, String userId);


}
